package com.ruoyi.carowner.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carowner.mapper.CarownerWalletBankcardMapper;
import com.ruoyi.carowner.domain.CarownerWalletBankcard;
import com.ruoyi.carowner.service.ICarownerWalletBankcardService;

/**
 * 银行卡信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CarownerWalletBankcardServiceImpl implements ICarownerWalletBankcardService {
    @Autowired
    private CarownerWalletBankcardMapper carownerWalletBankcardMapper;


    /**
     * 查询银行卡信息
     *
     * @param id 银行卡信息主键
     * @return 银行卡信息
     */
    @Override
    public CarownerWalletBankcard selectCarownerWalletBankcardById(Integer id) {
        return carownerWalletBankcardMapper.selectCarownerWalletBankcardById(id);
    }

    @Override
    public List<CarownerWalletBankcard> selectByUserId(Integer user_id) {
        return carownerWalletBankcardMapper.selectByUserId(user_id);
    }

    /**
     * 查询银行卡信息列表
     *
     * @param carownerWalletBankcard 银行卡信息
     * @return 银行卡信息
     */
    @Override
    public List<CarownerWalletBankcard> selectCarownerWalletBankcardList(CarownerWalletBankcard carownerWalletBankcard) {
        return carownerWalletBankcardMapper.selectCarownerWalletBankcardList(carownerWalletBankcard);
    }

    /**
     * 新增银行卡信息
     *
     * @param carownerWalletBankcard 银行卡信息
     * @return 结果
     */
    @Override
    public int insertCarownerWalletBankcard(CarownerWalletBankcard carownerWalletBankcard) {
        return carownerWalletBankcardMapper.insertCarownerWalletBankcard(carownerWalletBankcard);
    }

    /**
     * 修改银行卡信息
     *
     * @param carownerWalletBankcard 银行卡信息
     * @return 结果
     */
    @Override
    public int updateCarownerWalletBankcard(CarownerWalletBankcard carownerWalletBankcard) {
        return carownerWalletBankcardMapper.updateCarownerWalletBankcard(carownerWalletBankcard);
    }

    /**
     * 批量删除银行卡信息
     *
     * @param ids 需要删除的银行卡信息主键
     * @return 结果
     */
    @Override
    public int deleteCarownerWalletBankcardByIds(Integer[] ids) {
        return carownerWalletBankcardMapper.deleteCarownerWalletBankcardByIds(ids);
    }

    /**
     * 删除银行卡信息信息
     *
     * @param id 银行卡信息主键
     * @return 结果
     */
    @Override
    public int deleteCarownerWalletBankcardById(Integer id) {
        return carownerWalletBankcardMapper.deleteCarownerWalletBankcardById(id);
    }
}
